﻿using Deepseek_Robot.Modules.ViewModels;
using System;
using System.Windows;
using System.Windows.Controls;

namespace Deepseek_Robot.Modules.Views
{
    public partial class RunningLogPage : Page
    {
        private RunningLogViewModel viewModel;

        public RunningLogPage()
        {
            InitializeComponent();
            viewModel = new RunningLogViewModel();
            DataContext = viewModel;
        }

        private void comboTemplateNames_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            viewModel.SavePreviousSelection();

            MessageBoxResult result = MessageBox.Show("是否确认切换选项？", "确认", MessageBoxButton.YesNo);
            if (result == MessageBoxResult.No)
            {
                viewModel.RestorePreviousSelection();
                e.Handled = true;
            }
        }
    }
}